home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / Text Editor / Source / TextEditorLinking.cpp < prev    next >
Encoding:
Text File  |  1995-12-13  |  3.8 KB  |  161 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2.  
  3.     File:            TextEditorLinking.cpp
  4.     
  5.     Description:    TextEditor's linking protocol methods.
  6.     
  7.     Written by:        Steve Smith
  8.     
  9.     Copyright:        © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
  10.     
  11. ------------------------------------------------------------------------------*/
  12.  
  13. // Notification that this is a SOM source file
  14. #define SampleCode_TextEditor_Class_Prototypes
  15. // define underscore (_) field names
  16. #define VARIABLE_MACROS
  17.  
  18. #ifndef _COMPILERDEFS_
  19. #include "CompDefs.h"
  20. #endif
  21.  
  22. // -- OpenDoc Utilities --
  23.  
  24. #ifndef _EXCEPT_
  25. // Exceptions define several important macros (e.g. CHECKENV)
  26. // which are used in the SOM method dispatch glue. If Except.h
  27. // is not included early enough, exceptions may not be thrown
  28. // correctly when returning from a SOM method with "ev" parameter set.
  29. #include <Except.h>
  30. #endif
  31.  
  32. // -- TextEditor Includes
  33.  
  34. #ifndef SOM_SampleCode_TextEditor_xih
  35. #include "TextEditor.xih"
  36. #endif
  37.  
  38. #ifndef _TEXTEDITORDEF_
  39. #include "TextEditorDef.h"
  40. #endif
  41.  
  42. #ifndef _TEXTEDITORUTILS_
  43. #include "TextEditorUtils.h"
  44. #endif
  45.  
  46. #ifndef _TEXTEDITORGLOBALS_
  47. #include "TextEditorGlobals.h"
  48. #endif
  49.  
  50. // -- OpenDoc Includes --
  51.  
  52. #ifndef _ODTYPES_
  53. #include <ODTypes.h>
  54. #endif
  55.  
  56. #ifndef SOM_ODPart_xh
  57. #include <Part.xh>
  58. #endif
  59.  
  60.  
  61. //------------------------------------------------------------------------------
  62. // Method:        CreateLink
  63. // Origin:        ODPart
  64. //
  65. // Description:    This method is called by
  66. //------------------------------------------------------------------------------
  67. #pragma segment TextEditorLinking
  68.  
  69. SOM_Scope    ODLinkSource*  
  70. SOMLINK        TextEditor__CreateLink
  71.             (
  72.                 SampleCode_TextEditor*        somSelf, 
  73.                 Environment*                ev,
  74.                 ODByteArray*                data
  75.             )
  76. {
  77.     //SampleCode_TextEditorData *somThis = SampleCode_TextEditorGetData(somSelf);
  78.     SOMMethodDebug("TextEditor","CreateLink");
  79.  
  80.     SOM_TRY
  81.         THROW(kODErrNotImplemented);
  82.     SOM_CATCH_ALL
  83.     SOM_ENDTRY
  84.  
  85.     return kODNULL;
  86. }
  87.  
  88. //------------------------------------------------------------------------------
  89. // Method:        LinkUpdated
  90. // Origin:        ODPart
  91. //
  92. // Description:    This method is called by
  93. //------------------------------------------------------------------------------
  94. #pragma segment TextEditorLinking
  95.  
  96. SOM_Scope    void
  97. SOMLINK        TextEditor__LinkUpdated
  98.             (
  99.                 SampleCode_TextEditor*        somSelf, 
  100.                 Environment*                ev,
  101.                 ODLink*                        updatedLink,
  102.                 ODUpdateID                    id
  103.             )
  104. {
  105.     //SampleCode_TextEditorData *somThis = SampleCode_TextEditorGetData(somSelf);
  106.     SOMMethodDebug("TextEditor","LinkUpdated");
  107.  
  108.     SOM_TRY
  109.         THROW(kODErrNotImplemented);
  110.     SOM_CATCH_ALL
  111.     SOM_ENDTRY
  112. }
  113.  
  114. //------------------------------------------------------------------------------
  115. // Method:        RevealLink
  116. // Origin:        ODPart
  117. //
  118. // Description:    This method is called by
  119. //------------------------------------------------------------------------------
  120. #pragma segment TextEditorLinking
  121.  
  122. SOM_Scope    void
  123. SOMLINK        TextEditor__RevealLink
  124.             (
  125.                 SampleCode_TextEditor*        somSelf, 
  126.                 Environment*                ev,
  127.                 ODLinkSource*                linkSource
  128.             )
  129. {
  130.    // SampleCode_TextEditorData *somThis = SampleCode_TextEditorGetData(somSelf);
  131.     SOMMethodDebug("TextEditor","RevealLink");
  132.  
  133.     SOM_TRY
  134.         THROW(kODErrNotImplemented);
  135.     SOM_CATCH_ALL
  136.     SOM_ENDTRY
  137. }
  138.  
  139. //------------------------------------------------------------------------------
  140. // Method:        LinkStatusChanged
  141. // Origin:        ODPart
  142. //
  143. // Description:    This method is called by
  144. //------------------------------------------------------------------------------
  145. #pragma segment TextEditorLinking
  146.  
  147. SOM_Scope    void
  148. SOMLINK        TextEditor__LinkStatusChanged
  149.             (
  150.                 SampleCode_TextEditor*        somSelf, 
  151.                 Environment*                ev,
  152.                 ODFrame*                    frame
  153.             )
  154. {
  155.     SampleCode_TextEditorData *somThis = SampleCode_TextEditorGetData(somSelf);
  156.     SOMMethodDebug("TextEditor","LinkStatusChanged");
  157. }
  158.  
  159.  
  160.  
  161.